import request from '@/utils/request'
import qs from 'qs'

export function getBannerApi(id) {
  return request({
    url: `/banner/${id}`,
    method: 'get'
  })
}
export function getBannersApi(pageNo, pageSize, banner) {
  return request({
    url: `/banner?${qs.stringify(banner)}`,
    params:{
      pageNo: pageNo,
      pageSize: pageSize,
    },
    method: 'get'
  })
}
export function delBannerApi(id) {
  return request({
    url: `/banner/${id}`,
    method: 'delete'
  })
}
export function delBannersApi(banners) {
  return request({
    url: `/banner`,
    data:banners,
    method: 'delete'
  })
}
export function updateBannerApi(form) {
  return request({
    url: `/banner`,
    method: 'put',
    data:form,
  })
}
